
import urllib
##					##
# interface http     #
##					##
import ModuleLoader
from time import strftime
import hashlib

class intHttp:
    def __init__(self):
        #load modules
        moduleHook=ModuleLoader.ModuleLoader()
        moduleHook.loadModules()
    def info(self):
        return "The name is interface, HttpInterface"
    def login(self,user,password):
        return None
        
    def	loop(self):
        return None
        
    def alert(self,monitor,type,result):
        h = hashlib.md5()
        hash = h.update("supersecretpassword")
	message = "monitor:\n " + monitor + '\nresult:\n' + result +'\ntype:\n'\
	+ type 
	print "intHttp debug output:\n"
	print message
        params = urllib.urlencode({'password':h.hexdigest(),'message':message})
        f = urllib.urlopen("http://www.slacklabs.be/blogs/mon.php", params)
        return
